<%@Page Language="VB" %>
<html>
<head>
<!-- #include file="style.inc" -->
</head>
<body>
<!--------------------------------------------------------------------------->
<span class="heading">The HTML Control </span><p />

<form runat="server">
  <select id="MyListBox"  runat="server" multiple>
    <option value="Value 1">Option 1</option>
    <option value="Value 2">Option 2</option>
    <option value="Value 3">Option 3</option>
    <option value="Value 4">Option 4</option>
  </select><br/><br/>
  <input type="submit" value="Submit" />
</form>
<div id="divResult" runat="server" 
enableviewstate="false" /><p />
<div class="cite">
Change the values in the
 controls and click 'Submit'
</div>
<script runat="server">

Sub Page_Load(objSender As Object, e As EventArgs)
	
	Dim strResult As String
	strResult ="The following Items were selected"
	strResult +="<br />"
	Dim i As Integer
	For i=0 to MyListBox.Items.Count-1
		if MyListBox.Items(i).Selected=True then
			strResult +=MyListBox.Items(i).Value
			strResult +="<br />"
		End If
	Next
	divResult.InnerHtml=strResult 
End Sub
</script>

<!--------------------------------------------------------------------------->
<!-- #include file="foot.inc" -->
</body>
</html>

